import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import './plugins/element.js' 
import TreeTable from 'vue-table-with-tree-grid'
import axios from 'axios'
import fliterVues from './components/utils/ListTime'

Vue.config.productionTip = false
// 注册全局组件
Vue.component('tree-table', TreeTable)

axios.interceptors.request.use(config => {
  config.headers.Authorization = sessionStorage.getItem('token')
  return config
})
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
Vue.prototype.$http = axios
Vue.config.productionTip = false

for (const key in fliterVues) {
  Vue.filter(key, fliterVues[key])
}

const vm = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
export default vm
